﻿package dt.exchangeddata 
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import game.constants.ConstData;
	import game.events.EventData;
	import common.Utility;
	/**
	 * ...
	 * @author Nguyen Thi Bich Phuong (Daisy)
	 */
	public class TableLiveBetPoolInfo extends EventDispatcher {		
		public var numDragon:int = 0;
		public var numTiger:int = 0;
		public var numTie:int = 0;	
		/*public var numBankerPair:int = 0;
		public var numPlayerPair:int = 0;		
		public var numBig:int = 0;
		public var numSmall:int = 0;*/
		public function TableLiveBetPoolInfo() { }
		
		/**
		 * @author Daisy
		 * @param	result
		 * @param	tableNo
		 * @usage This function to set value for LiveBetPoolGame
		 */
		public function returnSetBetStatus(result:String, tableNo:String):void {			
			this.numDragon = parseInt(result.substr(ConstData.POS_LBPGAME_DRAGON, ConstData.LEN_LBPGAME_DRAGON));
			this.numTiger = parseInt(result.substr(ConstData.POS_LBPGAME_TIGER, ConstData.LEN_LBPGAME_TIGER));
			this.numTie = parseInt(result.substr(ConstData.POS_LBPGAME_TIE, ConstData.LEN_LBPGAME_TIE));
			/*this.numBankerPair = parseInt(result.substr(ConstData.POS_LBPGAME_BANKERPAIR, ConstData.LEN_LBPGAME_BANKERPAIR));
			this.numPlayerPair = parseInt(result.substr(ConstData.POS_LBPGAME_PLAYERPAIR, ConstData.LEN_LBPGAME_PLAYERPAIR));
			this.numBig = parseInt(result.substr(ConstData.POS_LBPGAME_BIG, ConstData.LEN_LBPGAME_BIG));
			this.numSmall = parseInt(result.substr(ConstData.POS_LBPGAME_SMALL, ConstData.LEN_LBPGAME_SMALL));*/
			
			dispatchEvent(new Event(EventData.UPDATE_LIVEBETPOOL_GAME));			
		}
	}
}